package com.smart.model.convert;

import com.smart.model.dtomapper.JiansheProjectDtoMapper;
import com.smart.model.domain.JiansheProjectDO;
import com.smart.model.vo.JiansheProjectVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class JiansheProjectConvert {

    public static List<JiansheProjectVO> buildJiansheProjectVoList(List<JiansheProjectDO> jiansheProjectDOList) {
        if (CollectionUtils.isEmpty(jiansheProjectDOList)) {
            return Lists.newArrayList();
        }
        List<JiansheProjectVO> jiansheProjectVOList = new ArrayList<>();
        for (JiansheProjectDO jiansheProjectDO : jiansheProjectDOList) {
            jiansheProjectVOList.add(JiansheProjectDtoMapper.INSTANCE.do2VO(jiansheProjectDO));
        }

        return jiansheProjectVOList;
    }
}
